package com.wdcg.model.dao;

import com.j256.ormlite.dao.ForeignCollection;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.field.ForeignCollectionField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName= "Dwarf")
public class Dwarf {
	public static final String DWARF_ID_COLUMN="dwarfID";
	public static final String DWARF_IS_VISIBLE_COLUMN="isVisible";
	public static final String DWARF_IS_UNLOCKED_COLUMN="isUnlocked";
	public static final String DWARF_IS_WAITING_FOR_PLAY_COLUMN="isWaitingForPlay";

	@DatabaseField(id=true, columnName=DWARF_ID_COLUMN)
	private int id;
	
	@DatabaseField(columnName = "longitude")
	private Double longitude;

	@DatabaseField(columnName = "latitude")
	private Double latitude;
	
	@DatabaseField(columnName="imgTitle")
	private String imgTitle;
	
	@DatabaseField(columnName=DWARF_IS_VISIBLE_COLUMN)
	private Boolean isVisible;
	
	@DatabaseField(columnName=DWARF_IS_UNLOCKED_COLUMN)
	private Boolean isUnlocked;
	
	@DatabaseField(columnName=DWARF_IS_WAITING_FOR_PLAY_COLUMN)
	private Boolean isWaitingForPlay;
	
	@ForeignCollectionField(eager=false)
	private ForeignCollection<DwarfDescription> dwarfDescriptions;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Double getLongitude() {
		return longitude;
	}

	public void setLongitude(Double longitude) {
		this.longitude = longitude;
	}

	public Double getLatitude() {
		return latitude;
	}

	public void setLatitude(Double latitude) {
		this.latitude = latitude;
	}

	public String getImgTitle() {
		return imgTitle;
	}

	public void setImgTitle(String imgTitle) {
		this.imgTitle = imgTitle;
	}

	public Boolean getIsVisible() {
		return isVisible;
	}

	public void setIsVisible(Boolean isVisible) {
		this.isVisible = isVisible;
	}

	public Boolean getIsUnlocked() {
		return isUnlocked;
	}

	public void setIsUnlocked(Boolean isUnlocked) {
		this.isUnlocked = isUnlocked;
	}

	public ForeignCollection<DwarfDescription> getDwarfDescriptions() {
		return dwarfDescriptions;
	}

	public void setDwarfDescriptions(
			ForeignCollection<DwarfDescription> dwarfDescriptions) {
		this.dwarfDescriptions = dwarfDescriptions;
	}

	public Boolean getIsWaitingForPlay() {
		return isWaitingForPlay;
	}

	public void setIsWaitingForPlay(Boolean isWaitingForPlay) {
		this.isWaitingForPlay = isWaitingForPlay;
	}

	@Override
	public String toString() {
		return "Dwarf [id=" + id + ", longitude=" + longitude + ", latitude="
				+ latitude + ", imgTitle=" + imgTitle + ", isVisible="
				+ isVisible + ", isUnlocked=" + isUnlocked
				+ ", dwarfDescriptions=" + dwarfDescriptions + "]";
	}
	
	
}
